package client;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.UIManager;

public class Screen_Balance extends JPanel {

	private JLabel lblBalance;
	private JLabel lblBtcBalance;
	private JTextField tfBtcBalance;
	private JLabel lblBtcBalanceDkk;
	private JTextField tfBtcBalanceDkk;
	private JButton btnReturn;
	

	/**
	 * Create the panel.
	 */
	public Screen_Balance() {
		setBackground(UIManager.getColor("Label.background"));
		setLayout(null);
		setSize(320, 480);

		lblBalance = new JLabel("View balance");
		lblBalance.setHorizontalAlignment(SwingConstants.CENTER);
		lblBalance.setFont(new Font("Eurostile", Font.BOLD, 16));
		lblBalance.setBounds(104, 35, 112, 50);
		add(lblBalance);

		btnReturn = new JButton("Return to main menu");
		btnReturn.setHorizontalAlignment(SwingConstants.CENTER);
		btnReturn.setFont(new Font("Eurostile", Font.BOLD, 14));
		btnReturn.setBounds(60, 300, 200, 45);
		add(btnReturn);
		
		lblBtcBalance = new JLabel("BTC balance");
		lblBtcBalance.setOpaque(true);
		lblBtcBalance.setBackground(UIManager.getColor("Label.background"));
		lblBtcBalance.setHorizontalAlignment(SwingConstants.LEFT);
		lblBtcBalance.setForeground(Color.BLACK);
		lblBtcBalance.setFont(new Font("Eurostile", Font.PLAIN, 12));
		lblBtcBalance.setBounds(64, 100, 200, 20);
		add(lblBtcBalance);
		
		tfBtcBalance = new JTextField();
		tfBtcBalance.setBounds(60, 120, 200, 35);
		tfBtcBalance.setFont(new Font("Eurostile", Font.PLAIN, 12));
		add(tfBtcBalance);
		tfBtcBalance.setColumns(10);

		lblBtcBalanceDkk = new JLabel("BTC balance in DKK");
		lblBtcBalanceDkk.setOpaque(true);
		lblBtcBalanceDkk.setBackground(UIManager.getColor("Label.background"));
		lblBtcBalanceDkk.setHorizontalAlignment(SwingConstants.LEFT);
		lblBtcBalanceDkk.setForeground(Color.BLACK);
		lblBtcBalanceDkk.setFont(new Font("Eurostile", Font.PLAIN, 12));
		lblBtcBalanceDkk.setBounds(64, 180, 200, 20);
		add(lblBtcBalanceDkk);
		
		tfBtcBalanceDkk = new JTextField();
		tfBtcBalanceDkk.setBounds(60, 200, 200, 35);
		tfBtcBalanceDkk.setFont(new Font("Eurostile", Font.PLAIN, 12));
		add(tfBtcBalanceDkk);
		tfBtcBalanceDkk.setColumns(10);
		
		
	}

	public JTextField getTfBtcBalance() {
		return tfBtcBalance;
	}

	public void setTfBtcBalance(double btcbalance) {
		
		tfBtcBalance.setText(Double.toString(btcbalance));
	}

	public JTextField getTfBtcBalanceDkk() {
		return tfBtcBalanceDkk;
	}

	public void setTfBtcBalanceDkk(double dkkbalance) {
		tfBtcBalanceDkk.setText(Double.toString(dkkbalance));
	}

	public JButton getBtnReturn() {
		return btnReturn;
	}

	public void addActionListener(ActionListener l) {
		btnReturn.addActionListener(l);

	}

}
